package com.springapp.web;

import com.springapp.domain.Job;
import com.springapp.service.JobService;
import com.springapp.util.PageResult;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

/**
 * Created by 雪峰 on 2016/5/6.
 */
//指定bean注入的配置文件
@ContextConfiguration(locations = { "classpath:spring/applicationContext.xml" })
//使用标准的JUnit @RunWith注释来告诉JUnit使用Spring TestRunner
@RunWith(SpringJUnit4ClassRunner.class)
public class queryByPage {
    @Resource
    private JobService jobService;
    @Test
    public void queryByPage() {
        PageResult<Job> pageResult =jobService.queryByPage("",1,10);
        System.out.println("查找结果" + pageResult);
    }
}
